import request from "@/utils/request";
import { getToken } from "@/utils/storage";
// 注册接口
export const register = (data) => {
  return request.post("/user/registered", data);
};

// 登录接口
export const login = (data) => {
  return request.post("/user/login", data);
};

//用户的资料
export const userList = () => {
  return request({
    url: "/user",
    headers: {
      authorization: getToken(),
    },
  });
};

//用户登出接口
export const logout = () => {
  return request.post("/user/logout");
};
